<extend name="Layout/ins_page" />

<block name="content">
    <!--content begin-->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
    <link href="/Public/CSS/Report/ProfitReportX/table1.css" rel="stylesheet" type="text/css" />

    <link href="/sap/demo.css" rel="stylesheet" type="text/css" />
    <script src="/sap/scripts/boot.js" type="text/javascript"></script>

    </head>
    <body>

    <!--<button class="btn btn-success" onClick ="$('#mytable').tableExport({type: 'excel', escape: 'false',tableName: 'profitcompare'});">导出EXCEL</button>-->
    <!--<input class="btn btn-success" type="submit" name="Submit" value="返回" onclick="window.history.back()" >-->
    <table border="1"  id="mytable" cellspacing="0" >
        <thead>
        <tr >
            <th  style="width:6%"><div align="center">平台代码</div></th>
            <th  style="width:6%"><div align="center">平台名称</div></th>
            <th  style="width:6%" ><div align="center">数量</div></th>
            <th  style="width:6%"><div align="center">金额</div></th>
        </tr>
        </thead>


        <foreach name="data" item="result">

        <tr align="center">
            <td><?php echo "<a href=\"javascript:popItemDetails('".$result['Cardcode']."','".$FromDate."','".$ToDate."')\">".$result['Cardcode']."</a>";?></td>
            <td><?php echo $result['CardName'];?></td>
            <td><?php echo round($result['SUMQTY'],0);?></td>
            <td><?php echo round($result['SUMPRICE'],2);?></td>
        </tr>

        </foreach>

    </table>
    <!--<input type="submit" class="btn btn-success"  name="Submit" value="返回" onclick="window.history.back()" >-->
    <!--<button class="btn btn-success" onClick ="$('#mytable').tableExport({type: 'excel', escape: 'false'});">导出EXCEL</button>-->

    <script>
        function popItemDetails(sku,f,t) {
            mini.open({
                url:  "/OutsideQuery/day20180807pop/code/"+sku+"/f/"+f+"/t/"+t,
                title: "",
                width: 800,
                height: 380,
                ondestroy: function (action) {}
            });

        }
        </script>

</block>